import request from '@/utils/request'

// 查询采集商品类目列表
export function listCollectProductCategory(query) {
  return request({
    url: '/gather/gather/collectProductCategory/list',
    method: 'get',
    params: query
  })
}

// 查询采集商品类目列表
export function selectlistCollectProductCategory(query) {
  return request({
    url: '/gather/gather/collectProductCategory/selectList',
    method: 'get',
    params: query
  })
}

// 查询有商品的类目列表
export function selectAlreadyList(query) {
  return request({
    url: '/gather/gather/collectProductCategory/selectAlreadyList',
    method: 'get',
    params: query
  })
}

// 查询采集商品类目详细
export function getCollectProductCategory(id) {
  return request({
    url: '/gather/gather/collectProductCategory/' + id,
    method: 'get'
  })
}

// 新增采集商品类目
export function addCollectProductCategory(data) {
  return request({
    url: '/gather/gather/collectProductCategory',
    method: 'post',
    data: data
  })
}

// 修改采集商品类目
export function updateCollectProductCategory(data) {
  return request({
    url: '/gather/gather/collectProductCategory',
    method: 'put',
    data: data
  })
}

// 删除采集商品类目
export function delCollectProductCategory(id) {
  return request({
    url: '/gather/gather/collectProductCategory/' + id,
    method: 'delete'
  })
}

// 测试发布
export function productUploadTest(query) {
  return request({
    url: '/gather/gather/collectProduct/productUploadTest',
    method: 'get',
    params: query
  })
}


// 获取测试失败原因
export function getUploadTestFailReason(query) {
  return request({
    url: '/gather/gather/collectProduct/getUploadTestFailReason',
    method: 'get',
    params: query
  })
}
